package com.medical.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalTime;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("scheduling")
public class Scheduling implements Serializable {
    @TableId(type = IdType.AUTO)
    @TableField("id")
    private Long id;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    @TableField("date")
    private Date date;

    @TableField("start_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm")

    private LocalTime startTime;

    @TableField("end_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm")
    private LocalTime endTime;

    @TableField("num")
    private Integer num;

    @TableField("residue")
    private Integer residue;

    @TableField("doctor")
    private String doctor;

}
